package com.ruoyi.hr.util;

/**
 * Created by lds
 * 2019-04-1
 * 枚举方式统一管理错误编码
 */
public enum ResultEnum {
    SUCCESS(0, "成功"),
    FAILURE(1, "失败"),
    ILLEGAL_ERROR(-100,"非法请求"),
    PARAME_ERROR(400, "参数错误"),
    PARAME_ERROR_NULL(401, "参数不能为空"),
    TOKEN_INVALID_ERROR(505, "身份过期，请重新登录"),
    NOT_AUTH(503,"无权限访问"),
    NO_USER_ERROR(307,"该用户不存在"),
    FORBIDDEN_USER_ERROR(308,"该用户被禁用"),
    USER_DEL_ERROR(309,"该用户被移除"),
    NO_PHONE_ERROR(317,"手机号码不能为空"),
    NO_CODE_ERROR(318,"短信验证码失效，请重新发送"),
    CODE_ERROR(313,"短信验证码不正确，请重新输入"),
    NO_USERNAME_ERROR(305,"请输入护工工号"),
    NO_PASSWORD_ERROR(306,"请输入密码"),
    USER_PASSWORD_ERROR(310,"密码错误"),
    SERVER_ERROR(500, "服务繁忙"),
    REDIS_SERVER_ERROR(501, "服务繁忙"),

    NO_DATA_ERROR(300, "没有数据"),
    GOODS_DOWN_ERROR(301, "商品已下架"),
    NO_ORDER_ERROR(302, "订单不存在"),
    NO_DOC_ERROR(303, "该文章已删除"),
    NO_EVALUTION_ERROR(303, "回复的评价不存在"),
    NO_FINISH_ORDER_ERROR(304, "订单未完成，不能评价"),

    USER_EXIT_ERROR(319,"该用户已存在"),

    NO_SERVICE_ERROR(311,"该服务已不存在"),
    FORBIDDEN_SERVICE_ERROR(312,"该服务被禁用"),
    NO_SITE_ERROR(313,"该收货地址已不存在"),
    NO_VERIFY_ERROR(314,"该服务审核未完成"),
    NO_GOODS_ERROR(315,"该商品已不存在"),
    USER_NO_VERIFY_ERROR(316,"该用户未完成审核"),

    NO_OLDMAN(320,"该老人不存在"),
    NO_BIND_EQUIOMENT(321,"该老人未绑定设备"),
    NO_CURRENT_ORDER(322,"当前订单不存在"),
    ERROR_CARDNO(323,"身份证号码不正确"),
    Exit_FAMILIY_MEMBER(324,"该账户已存在"),
    NO_BIND_USER(325,"请先绑定用户"),
    NO_Member_USER(326,"该家庭成员不存在"),
    DEL_Member_USER(327,"该家庭成员已被删除"),
    NO_OLD_MAN(326,"该老人不存在"),
    DEL_OLD_MAN(327,"该老人已被删除"),
    FORBIDDEN_OLD_MAN(327,"该老人已被禁用"),
    FAMILY_INVITATION(328,"家庭邀请码错误"),
    NO_MODIFICATION(329,"不允许修改成非默认家庭"),
    NO_GPS(330,"老人没有GPS设备"),
    NO_SERVER(331,"商品参数出错");

    private Integer code;

    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
